<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
        .radio-inline input[type=radio] {
            margin-top: 4px;

        }

        .gysDetail {
            display: none;
        }

    </style>
</head>

<body style="color:#333;padding:3px;">
<div class="row-margin-top">
    <form action="" class="form-inline">
        <table class="table" style="border:0;margin:1px">
            <td>供应商编号:</td>
            <td><input type="text" class="form-control" name="no" value="{$no}"></td>
            <td>供应商名称：</td>
            <td><input type="text" class="form-control" name="gys_name" value="{$gys_name}"></td>
            <td>
                <button class="btn-info btn">查询</button>
            </td>
        </table>
        <table class="tab-content table-bordered  table" border="1">
            <tr class="info">
                <th class="text-center">No.</th>
                <th class="text-center">供应商编号</th>
                <th class="text-center">供应商名称</th>
                <th class="text-center" colspan="4">供应商类别</th>
                <th class="text-center">操作</th>
            </tr>
            {volist name="data" id="row" key="k"}
            <tr>
                <td>{$k+(request()->param('page')?request()->param('page'):1-1)*10}</td>
                <td><a href="javascript:;" class="gysDetailBtn">{$row.no}</a></td>
                <td>{$row.gys_jian}</td>
                <td colspan="4">{$row.type_ids}</td>
                <td><a href="javascript:;" class="gysChange" data-id="{$row.id}" data-title="{$row.gys_jian}">选择</a>&nbsp;<a href="javascript:;" class="gysDetailBtn">供应商详情</a>
                </td>
            </tr>
            <tr class="gysDetail">
                <td colspan="8">
                    <p>全称：<span>{$row.gys_name}</span></p>
                    <p class="padding-10">供应商注册地址：<span>{$row.sign_address}</span></p>
                    <p>联系人：<span>{$row.contact}</span></p>
                    <p class="padding-10">联系人电话：<span>{$row.tel}</span></p>
                    <a href="javascript:;" class="closeTr">关闭</a>
                </td>
            </tr>
            {/volist}
        </table>
         <div class="row text-center" id="pageText" style="padding: 0;margin: 0;">
					<div class="col-sm-6 text-left"><div class="padding-10 countSize">共{$count}条记录，{$maxpage}页&nbsp;&nbsp;</div></div>
				<div class="col-sm-6 text-right">{$page}</div>
		</div>

    </form>
</div>
<!-- 全局js -->
<script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
<script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script>
    $('.gysChange').on('click',function () {
        var id = $(this).data('id')
        var title = $(this).data('title')
        parent.$('#gys_queding').find('.inin').html(title)
        parent.$('#gys_queding').find('[name=gys]').val(id)
        parent.$('#gys_queding').find('[name=gys_name]').val(title)
        parent.$('#gys_queding').show()
        parent.$('#gys_input').hide()
        parent.layer.close(parent.layer.getFrameIndex(window.name))
        return false
    })
    $(".gysDetailBtn").on("click", function () {

        var $gysDetail = $(this).parent().parent().next('tr')
        if ($gysDetail.hasClass('gysDetail')) {
            $gysDetail.removeClass('gysDetail')
        } else {
            $gysDetail.addClass('gysDetail')
        }
    })
    $(".closeTr").click(function () {
        var $gysDetail = $(".gysDetailBtn").parent().parent().next('tr');
        $gysDetail.addClass('gysDetail')
    })
</script>
</body>

</html>
